package com.clint.model;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.*;

/**
 * Created by dty on 2017/6/15.
 */
@Mapper
public interface UserMapper {
    @Select("SELECT * FROM USER WHERE NAME = #{name}")
    User findByName(@Param("name") String name);

    @Insert("INSERT INTO USER(NAME, AGE) VALUES(#{name}, #{age})")
    int insert(@Param("name") String name, @Param("age") Integer age);
}
